var time1;
var time2;
var time3;
var o = document.getElementById("oner");
var h = o.offsetHeight;
alert(h);

function clickone() {
    clearInterval(time1);
    clearInterval(time2);
    clearInterval(time3);
    time1 = setInterval(function () {
        var Top = document.documentElement.scrollTop;
        document.documentElement.scrollTop = Top - 50;
        if (Top == 0) {
            clearInterval(time1);
        }
    }, 30)
}

function clicktwo() {
    clearInterval(time1);
    clearInterval(time2);
    clearInterval(time3);
    time2 = setInterval(function () {
        if (document.documentElement.scrollTop > window.screen.height) {
            var Top = document.documentElement.scrollTop;
            document.documentElement.scrollTop = Top - 50;
            if (document.documentElement.scrollTop <= window.screen.height) {
                clearInterval(time2);
            }
        }
        else document.documentElement.scrollTop = document.documentElement.scrollTop + 50;
    }, 30)
}

function clickthree() {
    clearInterval(time1);
    clearInterval(time2);
    clearInterval(time3);
    time3 = setInterval(function () {
        var Top = document.documentElement.scrollTop;
        document.documentElement.scrollTop = Top + 50;
        if (document.documentElement.scrollTop >= window.screen.height * 2) {
            clearInterval(time3);
        }

    }, 30)

}